﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/MainTemplate.Master" AutoEventWireup="true" CodeBehind="ShoppingCart.aspx.cs" Inherits="AlexandriaPressWebsite.MasterPages.UserPages.ShoppingCart" %>
<asp:Content ID="Content1" ContentPlaceHolderID="mainDoc" runat="server">
<h1>Shopping Cart</h1>
 <asp:GridView ID="ShoppingCartView" runat="server" AllowPaging="True" OnRowEditing="ShoppingCartView_RowEditing" OnRowCancelingEdit="ShoppingCartView_RowCancellingEdit" OnRowUpdating="ShoppingCartView_OnRowUpdating" OnPageIndexChanging="ShoppingCartView_OnPageIndexChanging" AutoGenerateColumns="False" PageSize="50" BorderStyle="None" PagerSettings-PageButtonCount="30" GridLines="None" CssClass="grid" PagerStyle-CssClass="pager" AlternatingRowStyle-CssClass="alterRow">
        <Columns>
            <asp:TemplateField>
                <ItemTemplate >
                    <asp:Label ID="IDLabel" runat="server" Text='<%# Eval("BookID") %>' CssClass="invisiblelabel">
		            </asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Title">
                <ItemTemplate >
                    <asp:Label ID="TitleLabel" runat="server" Text='<%# Eval("Title") %>' >
		            </asp:Label>
                </ItemTemplate>
            </asp:TemplateField>      
            <asp:TemplateField HeaderText="Price">
                <ItemTemplate >
                    <asp:Label ID="PriceLabel" runat="server" Text='<%# Eval("Price") %>' >
		            </asp:Label>
                </ItemTemplate>
            </asp:TemplateField>                               
            <asp:TemplateField HeaderText="Quantity">
                <ItemTemplate >
                    <asp:Label ID="QuantityLabel" runat="server" Text='<%# Eval ("Quantity") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="QuantityBox" runat="server" Text='<%# Eval("Quantity") %>' ></asp:TextBox>
                </EditItemTemplate>
            </asp:TemplateField>            
            <asp:TemplateField HeaderText="Edit" ShowHeader="false">
                <ItemTemplate>
                   <asp:LinkButton ID="editButton" runat="server" CommandName="Edit" Text="Edit" ></asp:LinkButton>
               </ItemTemplate>
               <EditItemTemplate>
                   <asp:LinkButton ID="updateButton" runat="server" CommandName="Update" Text="Update" ></asp:LinkButton>
                   <asp:LinkButton ID="cancelButton" runat="server" CommandName="Cancel" Text="Cancel"></asp:LinkButton>
               </EditItemTemplate>
            </asp:TemplateField>            
        </Columns>
    </asp:GridView>
    <asp:Label ID="totalPrice" runat="server" Text="Total: " CssClass="simplelabel"></asp:Label>
    <asp:Button ID="ProceedToCheckOutButton" runat="server" 
        Text="Proceed to Checkout" onclick="ProceedToCheckOutButton_Click" CssClass="genericButton" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="formDoc" runat="server">
</asp:Content>
